package com.example.gokchinesefoodmappcdev.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.gokchinesefoodmappcdev.entity.GoodsInfo;
import com.example.gokchinesefoodmappcdev.entity.dto.GoodsDTO;
import com.example.gokchinesefoodmappcdev.entity.dto.GoodsInfoAndGoodsSkuDTO;
import com.example.gokchinesefoodmappcdev.entity.dto.GoodsInfoExcelDTO;
import com.example.gokchinesefoodmappcdev.entity.dto.UpdateGoodsDTO;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface GoodsInfoDao extends BaseMapper<GoodsInfo> {


    int insertGoodsInfo(GoodsDTO goodsInfo);

    int selectGoodsIdByGoodCode(GoodsDTO goodsInfo);

    int updateGoodsOnSale(@RequestParam("id") int id, @RequestParam("onSale") String onSale);

    int updateGoodsInfo(UpdateGoodsDTO goodsDTO);

    List<GoodsInfoExcelDTO> getGoodsInfo();

    List<GoodsInfoAndGoodsSkuDTO> findAllGoods(GoodsInfoAndGoodsSkuDTO goodsInfoAndGoodsSkuDTO);

    int countGoodsNum(GoodsInfoAndGoodsSkuDTO goodsInfoAndGoodsSkuDTO);
}
